<?php

namespace app\admin\model;

use think\Model;

class AdminUserModel extends Model
{
    // 设置当前模型对应的完整数据表名称
    protected $table = 'admin_user';

    /**
     * 获取对应的权限ID
     * @param $id
     * @return array|null|\PDOStatement|string|Model
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public static function roleId($id)
    {
        $data = (new AdminUserModel)->where('id', $id)->find();
        return $data['role_id'];
    }
}